package net.xdclass.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Allen
 * @version 1.0
 * @date 2022/11/18 15:01
 */
@Data
@TableName(value = "product")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ProductDO implements Serializable {
    @TableId(value = "id", type = IdType.NONE)
    private Long id;

    /**
     * 商品标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 详情
     */
    @TableField(value = "detail")
    private String detail;

    /**
     * 图片
     */
    @TableField(value = "img")
    private String img;

    /**
     * 产品层级：FIRST青铜、SECOND黄金、THIRD钻石
     */
    @TableField(value = "`level`")
    private String level;

    /**
     * 原价
     */
    @TableField(value = "old_amount")
    private BigDecimal oldAmount;

    /**
     * 现价
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 工具类型 short_link、qrcode
     */
    @TableField(value = "plugin_type")
    private String pluginType;

    /**
     * 日次数：短链类型
     */
    @TableField(value = "day_times")
    private Integer dayTimes;

    /**
     * 总次数：活码才有
     */
    @TableField(value = "total_times")
    private Integer totalTimes;

    /**
     * 有效天数
     */
    @TableField(value = "valid_day")
    private Integer validDay;

    @TableField(value = "gmt_modified")
    private Date gmtModified;

    @TableField(value = "gmt_create")
    private Date gmtCreate;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_TITLE = "title";

    public static final String COL_DETAIL = "detail";

    public static final String COL_IMG = "img";

    public static final String COL_LEVEL = "level";

    public static final String COL_OLD_AMOUNT = "old_amount";

    public static final String COL_AMOUNT = "amount";

    public static final String COL_PLUGIN_TYPE = "plugin_type";

    public static final String COL_DAY_TIMES = "day_times";

    public static final String COL_TOTAL_TIMES = "total_times";

    public static final String COL_VALID_DAY = "valid_day";

    public static final String COL_GMT_MODIFIED = "gmt_modified";

    public static final String COL_GMT_CREATE = "gmt_create";
}